import React,{Component} from 'react';

export default class AppMain extends Component{

  componentDidMount() {
    this.el.focus();
  }

  render(){
    return(
      <div>
      <p className="App-intro">
        To get started, edit <code>src/App.js</code> and save to reload.
      </p>
      <input type="text" tabIndex="2" value={this.props.value} name="value" onChange={this.props.handleChange}/>

      <div>
        <select className="Chosen-select" tabIndex="1" value={this.props.sex} ref={el=>this.el=el} name="sex" onChange={this.props.handleChange}>
          <option value="male">male</option>
          <option value="female">female</option>
        </select>
      </div>
      </div>
    )
  }

}
